﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZBJF.Warranty.Model.ViewModel.BaseQueryModel
{
    #region

    /// <summary>
    /// 分页基类
    /// </summary>
    [Serializable]
    public class BaseQueryParams
    {
        /// <summary>
        /// DataTable请求服务器端次数
        /// </summary>       
        public string sEcho { get; set; }

        /// <summary>
        /// 每页显示的数量
        /// </summary>
        public int iDisplayLength { get; set; }

        /// <summary>
        /// 分页时每页跨度数量
        /// </summary>
        public int iDisplayStart { get; set; }

        /// <summary>
        /// 排序字段如:ApplyName asc|ApplyPhone desc
        /// </summary>
        public string iSorts { get; set; }

        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex
        {
            get { return iDisplayLength == 0 ? 1 : iDisplayStart / iDisplayLength + 1; }
        }

        public string Keyword { get; set; }

        public string CurrentUser { get; set; }

        public bool? IsAvailable { get; set; }

    }

    #endregion
}
